package reservationManagement;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;

import booksManagement.Copy;
import booksManagement.Media;

import javax.persistence.*;

import exceptions.TooManyReservationsException;

import subscribersManagement.Subscriber;

/*@Entity
@Table(name="loans")
@NamedQuery(name="findAllReservations", query="select r from Reservation r")
public class Reservation implements Serializable
{
	@EmbeddedId
	private ReservationPK resPK;
	@OneToOne(cascade = CascadeType.ALL)
  @JoinColumn(name = "media_id")
	private Media media = null;
	

	public Media getMedia()
  {
  	return media;
  }

	public void setMedia(Media media)
  {
		if (media==null)
			throw new NullPointerException("null value of media");
  	this.media = media;
  }
	public Reservation(){
		
	}
	
	public Reservation(Media media){
		this.setMedia(media);
		
	}
	

}

class ReservationPK{
	@Id
	private long mediaId;
	
	@Id
	private long subscriberId;
}*/
